import 'package:flutter/material.dart';

import 'search_appbar.dart';

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: HomePage(),
    );
  }
}

class HomePage extends StatelessWidget {


  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Column(
        children: [
          SearchAppBar(
            onChange: (value) {
              print('onChange: $value');
            },
            onSearch: (value) {
              print('onSearch: $value');
            },
          ),
          Expanded(
            child: ListView.builder(
              itemCount: 50,
              itemBuilder: (BuildContext context, int index) {
                return ListTile(
                  title: Text('Item #$index'),
                );
              },
            )
          )
        ],
      ),
    );
  }
}
